
#ifndef _QGCM_MEXAUX_
#define _QGCM_MEXAUX_

#include "mexContainer.h"
#include "datatypes.h"
#include "model.h"
#include "static.h"

bool mx_write_static_coeffs(model_class &,
                            const char * filename,
                            bool overwrite,
                            const static_container * Rs, const static_container * Ss, 
                            const map_container<REAL, 6> * Amap,
                            const map_container<REAL, 3> * Qmap,
                            const map_container<REAL, 3> * QImap);


bool mx_read_static_data(model_class & mo, const char * filename, 
                         static_container & Rs, static_container & Ss, map_container<REAL,6> & Acoeffs,
                         map_container<REAL,3> &  Qcoeffs, map_container<REAL,3> & QIcoeffs);

bool mx_read_static_data(model_class & mo, const char * filename, 
                         map_container<REAL,3> &  Qcoeffs, map_container<REAL,3> & QIcoeffs);

bool mx_save_model_state( const model_class & mo, const char * filename );

bool mx_restore_model_state( model_class & mo, const char * filename );

#endif
